package com.lanou3g.code0418.methods;

/**
 * Created by dllo on 18/4/18.
 */
public class ThreadUtil {
    public static void sleep(long ms){
        try {
            //让线程沉睡多少毫秒，该方法会抛出一个异常
            // 需要try－catch，并且线程在沉睡的时候，不会释放锁
            Thread.sleep(ms);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
